<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <title> 3年级下学期计算题生成器 </title>
</head>

    <body>
        <div style="font-size:30px;">
            <script type="text/javascript">
                var count = 0;

                // 加减
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 1000 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    if (a + b > c)
                    {
                        count++;
                        document.write(a + " + " + b + " - " + c + " = <span style='color:#fff;'>" + (a+b-c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 减加
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 1000 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    if (a > b)
                    {
                        count++;
                        document.write(a + " - " + b + " + " + c + " = <span style='color:#fff;'>" + (a-b+c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 除减
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 10 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    if (b > 1 && a % b == 0 && (a / b > c))
                    {
                        count++;
                        document.write(a + " ÷ " + b + " - " + c + " = <span style='color:#fff;'>" + (a/b-c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 除加
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 10 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    if (b > 1 && a % b == 0)
                    {
                        count++;
                        document.write(a + " ÷ " + b + " + " + c + " = <span style='color:#fff;'>" + (a/b+c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 乘减
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 100 + 1);
                    var b = parseInt(Math.random() * 100 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    if (a * b > c)
                    {
                        count++;
                        document.write(a + " × " + b + " - " + c + " = <span style='color:#fff;'>" + (a*b-c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 乘加
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 100 + 1);
                    var b = parseInt(Math.random() * 100 + 1);
                    var c = parseInt(Math.random() * 1000 + 1);

                    {
                        count++;
                        document.write(a + " × " + b + " + " + c + " = <span style='color:#fff;'>" + (a*b+c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 乘除
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 100 + 1);
                    var b = parseInt(Math.random() * 100 + 1);
                    var c = parseInt(Math.random() * 10 + 1);

                    if (a * b % c == 0)
                    {
                        count++;
                        document.write(a + " × " + b + " ÷ " + c + " = <span style='color:#fff;'>" + (a*b/c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 除乘
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 100 + 1);
                    var b = parseInt(Math.random() * 10 + 1);
                    var c = parseInt(Math.random() * 100 + 1);

                    if (b > 1 && a % b == 0)
                    {
                        count++;
                        document.write(a + " ÷ " + b + " × " + c + " = <span style='color:#fff;'>" + (a/b*c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 减除
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 1000 + 1);
                    var c = parseInt(Math.random() * 10 + 1);

                    if (c > 1 && b % c == 0 && a > b / c)
                    {
                        count++;
                        document.write(a + " - " + b + " ÷ " + c + " = <span style='color:#fff;'>" + (a-b/c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

                document.write('<hr/>');
                count = 0;
                // 减乘
                for (var i = 0; i < 1000; i++)
                {
                    var a = parseInt(Math.random() * 1000 + 1);
                    var b = parseInt(Math.random() * 100 + 1);
                    var c = parseInt(Math.random() * 100 + 1);

                    if (b > 1 && c > 1 && a > b * c)
                    {
                        count++;
                        document.write(a + " - " + b + " × " + c + " = <span style='color:#fff;'>" + (a-b*c) + "</span><br />");
                    }

                    if (count >= 3) break;
                }

            </script>
        </div>
    </body>
</html>
